﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DTO;
using BUS;
using GUI;
using Pre_final;

namespace GUI
{
    public partial class GiaoDienChinh : Form
    {
        public GiaoDienChinh()
        {
            InitializeComponent();
        }

        private void btMonHoc_Click(object sender, EventArgs e)
        {
            DataTable tb = MonHocBUS.LayDuLieuFullMonHoc();
            dagrvDanhSachLietKe.Visible = true;
            dagrvDanhSachLietKe.DataSource = tb;
            dagrvDanhSachLietKe.Refresh();
        }

        private void btGiaoVien_Click(object sender, EventArgs e)
        {
            DataTable tb = LayDuLieuBUS.LayDuLieuBangGiaoVien();
            dagrvDanhSachLietKe.Visible = true;
            dagrvDanhSachLietKe.DataSource = tb;
            dagrvDanhSachLietKe.Refresh();
        }

        private void btHocSinh_Click(object sender, EventArgs e)
        {
            DataTable tb = LayDuLieuBUS.LayDuLieuBangHocSinh();
            dagrvDanhSachLietKe.Visible = true;
            dagrvDanhSachLietKe.DataSource = tb;
            dagrvDanhSachLietKe.Refresh();
        }

        private void btDanhSachLop_Click(object sender, EventArgs e)
        {
            DataTable tb = LayDuLieuBUS.LayDuLieuBangLop();
            dagrvDanhSachLietKe.Visible = true;
            dagrvDanhSachLietKe.DataSource = tb;
            dagrvDanhSachLietKe.Refresh();
        }

        private void tbBanQuanTri_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = true;
            DataTable tb = LayDuLieuBUS.LayDuLieuBangBanQuanTri();

            dagrvDanhSachLietKe.DataSource = tb;
            dagrvDanhSachLietKe.Refresh();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
           
            TiepNhanHocSinh testDialog = new TiepNhanHocSinh();
            testDialog.ShowDialog(this);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
            ThemVaoLop testDialog = new ThemVaoLop();
            testDialog.ShowDialog(this);
            
        }

        private void btTraCuuHocSinh_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
            TraCuuHocSinh testDialog = new TraCuuHocSinh();
            testDialog.ShowDialog( this );
            

        }

        private void btNhapBangDiemMon_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
            KetQuaMonHoc testDialog = new KetQuaMonHoc();
            testDialog.ShowDialog(this);
        }

        private void btBaoCaoTongKetMon_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
            BaoCaoTongKetMon testDialog = new BaoCaoTongKetMon();
            testDialog.ShowDialog(this);
        }

        private void btBaoCaoTongKetHocKy_Click(object sender, EventArgs e)
        {
            dagrvDanhSachLietKe.Visible = false;
            BaoCaoTongKetHocKy testDialog = new BaoCaoTongKetHocKy();
            testDialog.ShowDialog(this);
           
        }

        private void btThayDoiQuyDinh_Click(object sender, EventArgs e)
        {
          
            dagrvDanhSachLietKe.Visible = false;
            QuyDinh testDialog = new QuyDinh();
            testDialog.ShowDialog(this);
           
        }
















 
    }
}
